package top.oylan.manager.service;

import com.sun.tools.corba.se.idl.InterfaceGen;
import top.oylan.manager.entity.*;
import top.oylan.manager.entity.extend.WatchedExtend;
import top.oylan.manager.entity.mp.MpRecommended;
import top.oylan.manager.entity.mp.MpVideo;
import top.oylan.manager.tools.Pager;

import java.util.ArrayList;
import java.util.List;

public interface ProductService {

    /**
     * 课程分页查询
     * @param pager
     * @return
     */
    List<Course> selectCourseByPager(Pager pager);

    /**
     *  根据id 查询 课程
     * @return
     */
    Course selectProductById(Integer id);

    /**
     *  更新
     * @param product
     * @return
     */
    int updateProduct(Product product);

    /**
     *  新增
     * @return
     */
    int addProduct(Product product);

    /**
     * 删除
     * @param id
     * @return
     */
    int delete(Integer id);

    List<Video> selectVideoByPager(Pager pager);

    ArrayList<Product> selectByType(int type);

    ArrayList<Video> selectProductByPager(Pager pager);

    List<Video> selectMovieByPager(Pager pager);

    List<Recommended> selectRecommendByType(int type,Pager pager);

    List<Recommended> selectRecommendByType(int type);

    int countByType(int type);

    int setRecommend(Byte type, List<Integer> ids);

    int deleteRecommend(int id);

    List<MpRecommended> selectRecommendedForMp();

    MpVideo findVideoById(Integer id, Integer userId);

    Product findBaseInfoById(Integer id);

    List<WatchedExtend> selectMyCourse(Pager pager);

    List<WatchedExtend> selectMyWatched(Integer userId);

    Watched findUserWatched(Watched condition);

    int saveWatched(Watched watched);

    List<Book> selectBooksByPager(Pager pager);

    int watch(Integer id);

    /**
     * 我的书籍
     * @param pager
     * @return
     */
    List<Book> selectMyBooksByPager(Pager pager);
}
